﻿@ModelType IEnumerable(Of Employee)
@Code
ViewData("Title") = "Index"
End Code

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(Function(model) model.LastName)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.FirstName)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.Title)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.TitleOfCourtesy)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.BirthDate)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.HireDate)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.Address)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.City)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.Region)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.PostalCode)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.Country)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.HomePhone)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.Extension)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.Photo)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.Notes)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.ReportsTo)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.upsize_ts)
        </th>
        <th></th>
    </tr>

@For Each item In Model
    @<tr>
        <td>
            @Html.DisplayFor(Function(modelItem) item.LastName)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.FirstName)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.Title)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.TitleOfCourtesy)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.BirthDate)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.HireDate)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.Address)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.City)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.Region)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.PostalCode)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.Country)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.HomePhone)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.Extension)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.Photo)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.Notes)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.ReportsTo)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) item.upsize_ts)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", New With {.id = item.EmployeeID }) |
            @Html.ActionLink("Details", "Details", New With {.id = item.EmployeeID }) |
            @Html.ActionLink("Delete", "Delete", New With {.id = item.EmployeeID })
        </td>
    </tr>
Next

</table>
